from django.shortcuts import render
from .models import Article

# Create your views here.
def home(request):
    article_list = Article.objects.all()
    return render(request, 'index.html', {'article_list': article_list})

def detail(request, my_args):
    post = Article.objects.get(id=int(my_args))
    return render(request, 'detail.html', {'post': post})

